#ifndef HIK_CAMERA_CONTROLLER_H
#define HIK_CAMERA_CONTROLLER_H

#include <QObject>
#include <QString>
#include <hikvision_sdk/include/HCNetSDK.h>

class HikCameraController : public QObject
{
    Q_OBJECT
public:
    explicit HikCameraController(QObject *parent = nullptr);
    ~HikCameraController();

    // 登录摄像头设备
    Q_INVOKABLE bool loginDevice(const QString &ip, const QString &username, const QString &password);
    
    // 云台控制命令
    Q_INVOKABLE void controlPTZ(int command, int speed = 1);
    
    // 登出设备
    Q_INVOKABLE void logoutDevice();

signals:
    void errorOccurred(const QString &errorMessage);

private:
    long m_userId = -1;  // 设备登录句柄
};

#endif // HIK_CAMERA_CONTROLLER_H
